package com.ktgj.service.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.service.mapper.KtserviceViphallTagMapper;
import com.ktgj.service.domain.KtserviceViphallTag;
import com.ktgj.service.service.IKtserviceViphallTagService;

/**
 * 贵宾厅标签Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-09-03
 */
@Service
public class KtserviceViphallTagServiceImpl implements IKtserviceViphallTagService 
{
    @Autowired
    private KtserviceViphallTagMapper KtserviceViphallTagMapper;

    /**
     * 查询贵宾厅标签* 
     * @param tagId 贵宾厅标签ID
     * @return 贵宾厅标签*/
    @Override
    public KtserviceViphallTag selectKtserviceViphallTagById(Long tagId)
    {
        return KtserviceViphallTagMapper.selectKtserviceViphallTagById(tagId);
    }

    /**
     * 查询贵宾厅标签列表
     * 
     * @param KtserviceViphallTag 贵宾厅标签* @return 贵宾厅标签*/
    @Override
    public List<KtserviceViphallTag> selectKtserviceViphallTagList(KtserviceViphallTag KtserviceViphallTag)
    {
        return KtserviceViphallTagMapper.selectKtserviceViphallTagList(KtserviceViphallTag);
    }

    /**
     * 新增贵宾厅标签* 
     * @param KtserviceViphallTag 贵宾厅标签* @return 结果
     */
    @Override
    public int insertKtserviceViphallTag(KtserviceViphallTag KtserviceViphallTag)
    {
        KtserviceViphallTag.setCreateTime(DateUtils.getNowDate());
        KtserviceViphallTag.setIsdeleted("false");
        KtserviceViphallTag.setOpemployeeId(10l);
        return KtserviceViphallTagMapper.insertKtserviceViphallTag(KtserviceViphallTag);
    }

    /**
     * 修改贵宾厅标签* 
     * @param KtserviceViphallTag 贵宾厅标签* @return 结果
     */
    @Override
    public int updateKtserviceViphallTag(KtserviceViphallTag KtserviceViphallTag)
    {
        KtserviceViphallTag.setUpdateTime(DateUtils.getNowDate());
        return KtserviceViphallTagMapper.updateKtserviceViphallTag(KtserviceViphallTag);
    }

    /**
     * 批量删除贵宾厅标签* 
     * @param tagIds 需要删除的贵宾厅标签ID
     * @return 结果
     */
    @Override
    public int deleteKtserviceViphallTagByIds(Long[] tagIds)
    {
        return KtserviceViphallTagMapper.deleteKtserviceViphallTagByIds(tagIds);
    }

    /**
     * 删除贵宾厅标签信息
     * 
     * @param tagId 贵宾厅标签ID
     * @return 结果
     */
    @Override
    public int deleteKtserviceViphallTagById(Long tagId)
    {
        return KtserviceViphallTagMapper.deleteKtserviceViphallTagById(tagId);
    }

    /**
     * 贵宾厅标签排序号升序操作
     */
    @Override
    public int updateKtserviceViphallTagByTagsort(Long tagId) {
        return KtserviceViphallTagMapper.updateKtserviceViphallTagByTagsort(tagId);
    }

    @Override
    public int updateKtserviceViphallTagByTagsorts(Long tagId) {
        return KtserviceViphallTagMapper.updateKtserviceViphallTagByTagsorts(tagId);
    }

    /**
     * 弹窗(标签)
     * */
    @Override
    public List<KtserviceViphallTag> selectViphallTag(String name) {
        List<KtserviceViphallTag> ktserviceViphallTagList = KtserviceViphallTagMapper.selectViphallTag(name);
        return ktserviceViphallTagList;
    }
}
